Variables widget

Path: Widget Gallery> Advanced> Data Sources

Use this widget to add internal variables for operations such as data transfer or to be used in JavaScript programs.

Note: The variables are local to the page where the widget has been inserted.

When you drag and drop this widget into you page, a place holder will be displayed to indicate the widget location, but it will not be visible at runtime.

Setting the widget

To create variables and assign values to them, open the Variables dialog from the Variables property in the Properties pane.

These variables can then be referenced from the Attach tag dialog, from the Page Editor.

Global Variable Widget

If you need global variables, configure them at project level, adding the desired variables to the global variable widget.

Using variables in JavaScript

Variables can be also referenced in JavaScript programs with the following syntax:

For local variables:

var varWgt = page.getWidget("_VariablesWgt");

var compVar = varWgt.getProperty("VariableName");

For global variables:

var varWgt = project.getWidget("_VariablesWgt");

var compVar = varWgt.getProperty("VariableName");